import MyRequest from '@/utils/request/index'

class Category {
  categoryList() {
    return MyRequest.get({
      url: '/home/category/head'
    })
  }
  topCategoryList(id) {
    return MyRequest.get({
      url: '/home/category',
      params: { id }
    })
  }
  subCategoryList(id) {
    return MyRequest.get({
      url: '/category/sub/filter',
      params: { id }
    })
  }
  subCategoryGoods(data) {
    return MyRequest.post({
      url: '/category/goods/temporary',
      data
    })
  }
}

export default new Category()
